<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="jQuery.min.js"></script>
    <title>Document</title>
    <style>
        .ul>li {
            float: left;
            margin-left: 20px;
        }

        ul {
            display: none;
        }

        .ul {
            display: block;
            margin-left: 20px;

        }
    </style>
</head>

<body>
    <ul class="ul">
        <li>
            <a href="">新浪</a>
            <ul>
                <li>1</li>
                <li>1</li>
                <li>1</li>
            </ul>
        </li>
        <li>
            <a href="">新浪</a>
            <ul>
                <li>1</li>
                <li>1</li>
                <li>1</li>
            </ul>
        </li>
        <li>
            <a href="">新浪</a>
            <ul>
                <li>1</li>
                <li>1</li>
                <li>1</li>
            </ul>
        </li>
        <li>
            <a href="">新浪</a>
            <ul>
                <li>1</li>
                <li>1</li>
                <li>1</li>
            </ul>
        </li>
    </ul>
    <script>
        $(function () {
            // 鼠标经过
            $(".ul>li").mouseover(function () {
                $(this).children('ul').show();
            })
            //鼠标离开
            $(".ul>li").mouseout(function () {
                $(this).children("ul").hide();
            })
        })
    </script>
</body>

</html>